<!DOCTYPE html>
<html>

	<head>
		<meta charset="UTF-8">
		<title>表格隔行显示</title>
		<script type="text/javascript" src="js/jquery-1.11.3.js"></script>
		<script type="text/javascript">
			$(function(){				
				$("tr:even").css('background-color','green');
				$("tr:first").css('background-color','yellow');
			});
		</script>
	</head>

	<body>
		<table border="1" >
			<tr>
				<th>序号</th>
				<th>名称</th>
				<th>价格</th>
				<th>数量</th>
			</tr>
			<tr>
				<td>1</td>
				<td>htc</td>
				<td>3200</td>
				<td>10</td>
			</tr>
			<tr>
				<td>2</td>
				<td>apple</td>
				<td>4400</td>
				<td>13</td>
			</tr>
			<tr>
				<td>3</td>
				<td>nokia</td>
				<td>2300</td>
				<td>22</td>
			</tr>
			<tr>
				<td>4</td>
				<td>samsung</td>
				<td>3500</td>
				<td>35</td>
			</tr>
			<tr>
				<td>5</td>
				<td>heimei</td>
				<td>2500</td>
				<td>27</td>
			</tr>
		</table>
	</body>

</html>